package com.lee.demonacosclient.configuration;

import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.cloud.netflix.ribbon.RibbonClients;
import org.springframework.context.annotation.Configuration;
import ribbonconfiguration.RibbonConfiguration;

/**
 * @ClassName ServiceProviderRibbonConfiguration
 * @Description TODO
 * @Author leejiliang
 * @DateTime 2020/9/19 9:10 PM
 * @Version 1.0
 */

/**
 * 配置全局的负载均衡策略
 */
@Configuration
@RibbonClients(defaultConfiguration =RibbonConfiguration.class)
public class ServiceProviderRibbonConfiguration {

}


/**
 * 为 service-provider 指定单独的轮询策略, 这里是通过代码的方式配置负载均衡策略, 也可以通过配置的方式制定负载均衡策略.
 */
//@Configuration
//@RibbonClient(name = "service-provider", configuration = RibbonConfiguration.class)
//public class ServiceProviderRibbonConfiguration {
//
//}
